package 字符流.作业;

import java.io.*;

public class 使用字符缓冲流特有方法拷贝文件 {
    public static void main(String[] args) throws IOException {
        BufferedWriter bw = new BufferedWriter(new FileWriter("b.txt"));
        //流:写
        BufferedReader br = new BufferedReader(new FileReader("a.txt"));
        //流:读

        String lien;
        //记录读到的行
        while ((lien=br.readLine())!=null){
            bw.write(lien);
            bw.newLine();
        }
        bw.close();
        br.close();
    }
}
